import React, { useState } from 'react';
import { Card, Button, Table, Drawer } from 'antd';
import { BorderOutlined } from '@ant-design/icons';
import { producestore } from "../stores/Produce";
import { useSnapshot } from "valtio";
import { ColumnsType } from 'antd/es/table';

// 定义组件的 props 类型
interface HtablesProps {
    columns: ColumnsType<any>; // 根据实际数据类型替换 `any`
    opens?: boolean; // 默认值为 false
    data: any[]; // 根据实际数据类型替换 `any`
    pagination: object
}

export default function Htables({ columns, opens = false, data, pagination }: HtablesProps) {
    return (
        <div>
            <Table
                bordered
                columns={columns}
                pagination={pagination}
                dataSource={data}
                size="middle"
            />
        </div>
    );
}